package com.atguigu.tingshu.comment.streams;

import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.kstream.KStream;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class KafkaStreams {



    @Bean
    public KStream<String,String> kStream (StreamsBuilder streamsBuilder){
        KStream<String, String> commentTopic = streamsBuilder.stream("commentTopic");
        commentTopic

                .to("KafkaStreams");


        return commentTopic;
    }
}
